<HTML>
<HEAD>
<TITLE>JavaScript Source Code 3000:  Buttons:  Window Sizer</TITLE>
<META NAME="date" CONTENT="2000-09-09">
<META NAME="channel" CONTENT="Web Developer">
<META NAME="author" CONTENT="JavaScript Source Code 3000">
<META NAME="section" CONTENT="Buttons">
<META NAME="description" CONTENT="This is a JavaScript that shows you different window dimensions.  It helps you to customize your web pages with the dimensions that best compliment your web site.">

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function regular() {
window.open('window-sizer.html','640x480','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=640,height=480')}
function large() {
window.open('window-sizer.html','800x600','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=800,height=600')}
function smallmacdefault() {
window.open('window-sizer.html','Mac','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=470,height=300')}
function smallpcdefault() {
window.open('window-sizer.html','PC','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=580,height=300')}
function mediummacdefault() {
window.open('window-sizer.html','Mac','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=470,height=430')}
function mediumpcdefault() {
window.open('window-sizer.html','PC','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=580,height=430')}
function largemacdefault() {
window.open('window-sizer.html','Mac','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=470,height=600')}
function largepcdefault() {
window.open('window-sizer.html','PC','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=580,height=600')}
// End -->
</SCRIPT>

</HEAD>

<BODY BGCOLOR=#ffffff vlink=#0000ff>

<BR>
<center>
<table width="600" cellpadding="0" cellspacing="10">
<tr>
<td width="468" align="center">

	
</td>
<td width="120" align="center">

	
</td>
</tr>
</table>
<BR>
<BR>
<BASEFONT SIZE=3>
  <FONT SIZE=6>
<B><FONT SIZE="+2" FACE="Helvetica,Arial" ALIGN=RIGHT COLOR="#0000FF">
<b><A HREF="../index.htm" /" TARGET="_top">
Home</A> </b><img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <b><A HREF="index.htm" /buttons/"><font color="#FF0000">Buttons</font></A> </b>
<img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <FONT COLOR="#006666">Window Sizer</FONT></b></FONT><BR>
</B><BR>
  </FONT>
<table BORDER=0 WIDTH=486 CELLPADDING=3 CELLSPACING=0>
<tr><td><font FACE="helvetica,arial,geneva">
<br>
<br>
<!-- Description --><!--content_start-->

This is a JavaScript that shows you different window dimensions.  It helps you to customize your web pages with the dimensions that best compliment your web site.
<br>
<hr>
</td></tr>
</table>
<!-- Demonstration -->
<FORM>
Open a window 640 x 480 pixels: 
<INPUT TYPE=BUTTON VALUE="640x480" onClick="regular()">
<P>
Open a window 800 x 600 pixels: 
<INPUT TYPE=BUTTON VALUE="800x600" onClick="large()"><P>
<HR>
<P>
Default Netscape Browser sizes:
<P>
<B>640 x 480</B>
<BR>
Mac = 470x300: 
<INPUT TYPE=BUTTON VALUE="Mac" onClick="smallmacdefault()">
<BR>
PC  = 580x300: 
<INPUT TYPE=BUTTON VALUE="PC" onClick="smallpcdefault()">
<P>
<B>800 x 600</B>
<BR>
Mac = 470x430: 
<INPUT TYPE=BUTTON VALUE="Mac" onClick="mediummacdefault()">
<BR>
PC  = 580x430: 
<INPUT TYPE=BUTTON VALUE="PC" onClick="mediumpcdefault">
<P>
<B>1024 x 768</B><BR>
Mac = 470x600: 
<INPUT TYPE=BUTTON VALUE="Mac" onClick="largemacdefault()">
<BR>
PC  = 580x600: <INPUT TYPE=BUTTON VALUE="PC" onClick="largepcdefault()">
<P>
<P>
<HR>
<P>
Close this Window: 
<INPUT TYPE=BUTTON VALUE="Close"
onClick="window.close()">
</FORM>
<P>
<P>
<a name="source">
<table BORDER=0 WIDTH=486 CELLPADDING=3 CELLSPACING=0>
<tr><td BGCOLOR=yellow><font FACE="helvetica,arial,geneva"><b>JavaScript Source Code 3000:  Buttons:  Window Sizer</b>
<p>Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s).  The script is yours!!!<br><br></font></td></tr>
<tr><td BGCOLOR=yellow ALIGN=CENTER>
<FORM NAME="copy">

<DIV align="center">
<input type=button value="Highlight All" onClick="javascript:this.form.txt.focus();this.form.txt.select();">&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE="text" NAME="total" VALUE="Script Size:  2.79 KB  " size="24">
</DIV>

<textarea NAME="txt" ROWS=20 COLS=75 WRAP=VIRTUAL>

&lt;!-- TWO STEPS TO INSTALL WINDOW SIZER:

   1.  Paste the first code into the HEAD of your HTML document  --&gt;
   2.  Copy the final coding into the BODY of your HTML document  --&gt;

&lt;!-- STEP ONE: Copy this code into the BODY of your HTML document  --&gt;

&lt;HEAD&gt;

&lt;SCRIPT LANGUAGE="JavaScript"&gt;

&lt;! &gt;
&lt;! &gt;

&lt;!-- Begin
function regular() {
window.open('window-sizer.html','640x480','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=640,height=480')}
function large() {
window.open('window-sizer.html','800x600','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=800,height=600')}
function smallmacdefault() {
window.open('window-sizer.html','Mac','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=470,height=300')}
function smallpcdefault() {
window.open('window-sizer.html','PC','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=580,height=300')}
function mediummacdefault() {
window.open('window-sizer.html','Mac','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=470,height=430')}
function mediumpcdefault() {
window.open('window-sizer.html','PC','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=580,height=430')}
function largemacdefault() {
window.open('window-sizer.html','Mac','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=470,height=600')}
function largepcdefault() {
window.open('window-sizer.html','PC','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=580,height=600')}
// End --&gt;
&lt;/SCRIPT&gt;

&lt;!-- STEP TWO: Copy this code into the BODY of your HTML document  --&gt;

&lt;BODY&gt;

&lt;FORM&gt;
Open a window 640 x 480 pixels: 
&lt;INPUT TYPE=BUTTON VALUE="640x480" onClick="regular()"&gt;
&lt;P&gt;
Open a window 800 x 600 pixels: 
&lt;INPUT TYPE=BUTTON VALUE="800x600" onClick="large()"&gt;&lt;P&gt;
&lt;HR&gt;
&lt;P&gt;
Default Netscape Browser sizes:
&lt;P&gt;
&lt;B&gt;640 x 480&lt;/B&gt;
&lt;BR&gt;
Mac = 470x300: 
&lt;INPUT TYPE=BUTTON VALUE="Mac" onClick="smallmacdefault()"&gt;
&lt;BR&gt;
PC  = 580x300: 
&lt;INPUT TYPE=BUTTON VALUE="PC" onClick="smallpcdefault()"&gt;
&lt;P&gt;
&lt;B&gt;800 x 600&lt;/B&gt;
&lt;BR&gt;
Mac = 470x430: 
&lt;INPUT TYPE=BUTTON VALUE="Mac" onClick="mediummacdefault()"&gt;
&lt;BR&gt;
PC  = 580x430: 
&lt;INPUT TYPE=BUTTON VALUE="PC" onClick="mediumpcdefault"&gt;
&lt;P&gt;
&lt;B&gt;1024 x 768&lt;/B&gt;&lt;BR&gt;
Mac = 470x600: 
&lt;INPUT TYPE=BUTTON VALUE="Mac" onClick="largemacdefault()"&gt;
&lt;BR&gt;
PC  = 580x600: &lt;INPUT TYPE=BUTTON VALUE="PC" onClick="largepcdefault()"&gt;
&lt;P&gt;
&lt;P&gt;
&lt;HR&gt;
&lt;P&gt;
Close this Window: 
&lt;INPUT TYPE=BUTTON VALUE="Close"
onClick="window.close()"&gt;
&lt;/FORM&gt;

 

&lt;!-- Script Size:  2.79 KB  --&gt;
</textarea><br><font FACE="helvetica,arial,geneva"></font></td></tr>

</table>
</form>
</FONT>
</CENTER>


</center>
</body></html>